package com.myapp.struts.menu;

import java.util.ArrayList;

public class GBEveningHTML {

    private static GBEveningHTML gbEveningHTMLObj;
    ArrayList<FoodItems> gbEveningHTMLArray = new ArrayList<FoodItems>();

    public static synchronized GBEveningHTML getSingletonObject() {
        if (gbEveningHTMLObj == null) {
            gbEveningHTMLObj = new GBEveningHTML();
        }
        return gbEveningHTMLObj;
    }

    public Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException();
    }

    public String getGBEveningHTML(String fileLoc) {
        String fileName = "";

        MenuRead menuReadObj = new MenuRead();
        gbEveningHTMLArray = menuReadObj.ReadMenu(Constants.GREAT_BRITAN);
        
        MenuGenerate menuGenerateObj = new MenuGenerate();
        gbEveningHTMLArray = menuGenerateObj.GenerateMenu(gbEveningHTMLArray, Constants.EVENING_ONLY);

        MenuFormat menuFormatObj = new MenuFormat();
        fileName = menuFormatObj.FormatMenu(gbEveningHTMLArray, Constants.HTML, fileLoc);
        return fileName;

    }
}
